<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="save.js" type="text/javascript"></script>
</head>
<body>
<input type="button" value="保存" onclick="saFN()">
<script type="text/javascript">
    function saFN(){
        var blob = new Blob(["Hello, world!\t\n我是milo，你好啊"], {type: "text/plain;charset=utf-8"});
        saveAs(blob, "hello world.html");
    }
    //var blob = new Blob([要保存的文件流], { type: 'application/octet-stream' }),
    //fileName = 'filename' + path.substring(path.lastIndexOf("."), path.length);
    ////filename，摘取了常用的部分，其实还有其他一些mimetypes = array(
    ////    'doc'        => 'application/msword',
    ////    'bin'        => 'application/octet-stream',
    ////    'exe'        => 'application/octet-stream',
    ////    'so'        => 'application/octet-stream',
    ////    'dll'        => 'application/octet-stream',
    ////    'pdf'        => 'application/pdf',
    ////    'ai'        => 'application/postscript',
    ////    'xls'        => 'application/vnd.ms-excel',
    ////    'ppt'        => 'application/vnd.ms-powerpoint',
    ////    'dir'        => 'application/x-director',
    ////    'js'        => 'application/x-javascript',
    ////    'swf'        => 'application/x-shockwave-flash',
    ////    'xhtml'        => 'application/xhtml+xml',
    ////    'xht'        => 'application/xhtml+xml',
    ////    'zip'        => 'application/zip',
    ////    'mid'        => 'audio/midi',
    ////    'midi'        => 'audio/midi',
    ////    'mp3'        => 'audio/mpeg',
    ////    'rm'        => 'audio/x-pn-realaudio',
    ////    'rpm'        => 'audio/x-pn-realaudio-plugin',
    ////    'wav'        => 'audio/x-wav',
    ////    'bmp'        => 'image/bmp',
    ////    'gif'        => 'image/gif',
    ////    'jpeg'        => 'image/jpeg',
    ////    'jpg'        => 'image/jpeg',
    ////    'png'        => 'image/png',
    ////    'css'        => 'text/css',
    ////    'html'        => 'text/html',
    ////    'htm'        => 'text/html',
    ////    'txt'        => 'text/plain',
    ////    'xsl'        => 'text/xml',
    ////    'xml'        => 'text/xml',
    ////    'mpeg'        => 'video/mpeg',
    ////    'mpg'        => 'video/mpeg',
    ////    'avi'        => 'video/x-msvideo',
    ////    'movie'        => 'video/x-sgi-movie',

</script>
</body>
</html>